The QuickTime VR Manager provides a function that you can use to install an intercept procedure. Your intercept procedure can either replace the function it is intercepting or execute and then call through to the intercepted routine (by calling the QTVRCallInterceptedProc function).
You can use the QTVRInstallInterceptProc function to install or remove an intercept procedure for a QuickTime VR Manager function.
OSErr QTVRInstallInterceptProc (
QTVRInstanceqtvr,
QTVRProcSelectorselector,
QTVRInterceptUPPinterceptProc,
SInt32refCon,
UInt32 flags);
The QTVRInstallInterceptProc function installs the procedure specified by the interceptProc parameter as an intercept procedure for the QuickTime VR function specified by the selector parameter for the QuickTime VR movie specified by the qtvr parameter. Your intercept procedure is called whenever QuickTime VR is about to execute the function it's intercepting. Your procedure can simply replace the intercepted function, or it can call through to the intercepted function (either by calling the QTVRCallInterceptedProc function or by returning the value false in its cancel parameter).
Listing 8 illustrates the use of QTVRInstallInterceptProc .
You can use the QTVRCallInterceptedProc function to call an intercepted QuickTime VR function from within an intercept procedure.
OSErr QTVRCallInterceptedProc (
QTVRInstanceqtvr,
QTVRInterceptRecord*qtvrMsg);
The QTVRCallInterceptedProc function executes the QuickTime VR Manager function indicated by the selector field of the qtvrMsg intercept record. The parameters passed to that function are the QuickTime VR movie specified by the qtvr parameter and any other parameters contained in the parameter field of the qtvrMsg record. You can, if you wish, change the parameters in that field before calling QTVRCallInterceptedProc .
You can call QTVRCallInterceptedProc more than once in your intercept procedure. In addition, the QuickTime VR Manager will call the intercepted function again unless your intercept procedure returns true in its cancel parameter.
See "QuickTime VR Intercept Procedure" for information about intercept procedures. Listing 7 illustrates the use of QTVRCallInterceptedProc .